/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class ResultadoDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression res_id;
	public final StringExpression res_resultado;
	public final StringExpression res_fecha_actual;
	
	public ResultadoDetachedCriteria() {
		super(orm.Resultado.class, orm.ResultadoCriteria.class);
		res_id = new IntegerExpression("res_id", this.getDetachedCriteria());
		res_resultado = new StringExpression("res_resultado", this.getDetachedCriteria());
		res_fecha_actual = new StringExpression("res_fecha_actual", this.getDetachedCriteria());
	}
	
	public ResultadoDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.ResultadoCriteria.class);
		res_id = new IntegerExpression("res_id", this.getDetachedCriteria());
		res_resultado = new StringExpression("res_resultado", this.getDetachedCriteria());
		res_fecha_actual = new StringExpression("res_fecha_actual", this.getDetachedCriteria());
	}
	
	public LibroDetachedCriteria createLibrolibCriteria() {
		return new LibroDetachedCriteria(createCriteria("librolib"));
	}
	
	public PreguntaDetachedCriteria createPreguntapreCriteria() {
		return new PreguntaDetachedCriteria(createCriteria("preguntapre"));
	}
	
	public Resultado uniqueResultado(PersistentSession session) {
		return (Resultado) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Resultado[] listResultado(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Resultado[]) list.toArray(new Resultado[list.size()]);
	}
}

